60bf581f68c0a32de8ca9062c6ca41633ce0118b,Dart/src/com/jetbrains/lang/dart/ide/annotator/DartColorAnnotator.java,DartColorAnnotator,highlightDeclarationsAndInvocations,#PsiElement#AnnotationHolder#,142

Before Change


      final PsiElement child = decl.getFirstChild();
      final DartComponentName name = decl.getComponentName();
      final TextRange textRange = new TextRange(child.getTextOffset(), name.getTextRange().getEndOffset());
      holder.createInfoAnnotation(textRange, null).setTextAttributes(
        TextAttributesKey.find(DartSyntaxHighlighterColors.DART_CONSTRUCTOR_DECLARATION));
    }
    else if (element instanceof DartFactoryConstructorDeclaration) {
      final DartFactoryConstructorDeclaration decl = (DartFactoryConstructorDeclaration)element;

After Change


    return componentName;
  }

  private static void highlightDeclarationsAndInvocations(final @NotNull PsiElement element, final @NotNull AnnotationHolder holder) {
    if (element instanceof DartNewExpression) {
      final DartNewExpression newExpression = (DartNewExpression)element;
      final DartType type = newExpression.getType();
      createInfoAnnotation(holder, type, DartSyntaxHighlighterColors.DART_CONSTRUCTOR_CALL);
    }
    else if (element instanceof DartConstConstructorExpression) {
      final DartConstConstructorExpression constConstructorExpression = (DartConstConstructorExpression)element;
      final DartType type = constConstructorExpression.getType();
      createInfoAnnotation(holder, type, DartSyntaxHighlighterColors.DART_CONSTRUCTOR_CALL);
    }
    else if (element instanceof DartNamedConstructorDeclaration) {
      final DartNamedConstructorDeclaration decl = (DartNamedConstructorDeclaration)element;
      final PsiElement child = decl.getFirstChild();
      final DartComponentName name = decl.getComponentName();
      final TextRange textRange = new TextRange(child.getTextOffset(), name.getTextRange().getEndOffset());
      createInfoAnnotation(holder, textRange, DartSyntaxHighlighterColors.DART_CONSTRUCTOR_DECLARATION);
    }
    else if (element instanceof DartFactoryConstructorDeclaration) {
      final DartFactoryConstructorDeclaration decl = (DartFactoryConstructorDeclaration)element;